/**
 * Created with JetBrains PhpStorm.
 * User: Artem
 * Date: 04.03.13
 * Time: 22:28
 * To change this template use File | Settings | File Templates.
 */

Ext.define("Pro.view.MainPanel", {
    extend: "Ext.Panel",
    alias: "widget.mainpanel",
    region: "north",
    height: "100%",
    layout: "border",
    items: [
        {
            xtype: "panel",
            title: localization.MAIN_PANEL_TITLE || "Account Manager",
            region: "north",
            tbar: [
                {
                    xtype: "button",
                    text: localization.MAIN_PANEL_BUTTON_NEW_EMPLOYEE || "Create new Employee",
                    id: "newEmployee"
                },
                {
                    xtype: "button",
                    text: localization.MAIN_PANEL_BUTTON_INFO || "Info",
                    id: "info"
                },
                {
                    xtype: "button",
                    text: localization.MAIN_PANEL_ADD_NEW_BUTTON || "Add new",
                    menu: [
                        {
                            text: localization.MAIN_PANEL_ADD_NEW_COMPANY || "Company"
                        },
                        {
                            text: localization.MAIN_PANEL_ADD_NEW_LOCATION || "Location"
                        },
                        {
                            text: localization.MAIN_PANEL_ADD_NEW_STAGE || "Stage"
                        },
                        {
                            text: localization.MAIN_PANEL_ADD_NEW_TEAM || "Team",
                            id: "createNewTeamMenuIntem"
                        }
                    ]
                },
                "->",
                {
                    xtype: "combobox",
                    fieldLabel: localization.MAIN_PANEL_THEME_LABEL || "Theme",
                    editable: false,
                    store: "Themes",
                    queryMode: 'local',
                    displayField: 'name',
                    valueField: 'abr',
                    value: Ext.util.Cookies.get("theme") || "Default",
                    id: "themesBox"
                },
                {
                    xtype: "combobox",
                    fieldLabel: localization.MAIN_PANEL_LANGUAGE_LABEL || "Language",
                    editable: false,
                    store: "Languages",
                    queryMode: 'local',
                    displayField: 'name',
                    valueField: 'abr',
                    value: localization.MAIN_PANEL_LANGUAGE || "English",
                    id: "languagesBox"
                }
            ]
        },
        {
            xtype: "treepanel",
            width: 300,
            region: "west",
            id: "westPanel",
            layout: "fit",
            split: true
        },
        {
            xtype: "employeespanel",
            layout: "fit",
            region: "center",
            id: "emplPanel"
        }
    ]
});